package com.server;

import com.server.Netty.NettyServerStart;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.annotation.Order;

@Order(1)
@SpringBootApplication
public class ChatroomServerApplication implements CommandLineRunner {

	@Autowired
	NettyServerStart nettyServerStart;
	public static void main(String[] args) {
		SpringApplication.run(ChatroomServerApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		new Thread(nettyServerStart).start();
	}
}
